<%--

  @author yulezhisi
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>showPersonTask</title>

    <link rel="shortcut icon" href="<c:url value="/images/favicon.ico"/>" type="image/x-icon"/>
    <script src="<c:url value="/js/jquery-1.9.1.min.js"/>"></script>
    <script src="<c:url value="/layui/layui.js"/>"></script>
    <link rel="stylesheet" type="text/css" href="<c:url value="/layui/css/layui.css"/>">

    <script src="<c:url value="/js/my/commons.js"/>"></script>
    <style>
        .container {
            width: 1200px;
            margin: 100px auto;
        }
    </style>
    <style type="text/css">
        a {
            text-align: center;
            text-decoration: none;
            color: blue;
        }

        a:hover {
            color: red;
        }

        table, tr, td, th {
            border: 1px black solid;
            border-collapse: collapse;
        }

    </style>

<body style="margin: 0px">

<div class="container">
    <h1> ${sessionScope.user}</h1>
    <h1>待处理任务列表</h1>
    <table width="100%">
        <Tr>
            <Th>编号</Th>
            <Th>任务Id</Th>
            <Th>任务名称</Th>
            <Th>任务开始时间</Th>
            <Th>负责人</Th>
            <Th>采购单名称</Th>
            <Th>采购金额</Th>
            <Th>采购详情</Th>
            <Th>经办人</Th>
            <Th>处理</Th>
        </Tr>
        <c:forEach items="${list }" var="m" varStatus="st">
            <Tr align="center">
                <td>${st.count }</td>
                <td>${m.taskId}</td>
                <td>${m.taskName}</td>
                <td>
                    <fmt:formatDate value="${m.taskCreateTime }" pattern="yyyy-MM-dd HH:mm:ss"/>
                </td>
                <td>${m.assignee}</td>
                <td>${m.name}</td>
                <td style="color:blue">${m.price}</td>
                <td>${m.content}</td>
                <td>${m.user_id}</td>
                <td>
                    <c:choose>
                        <c:when test="${m.activityId=='createOrder' }">
                            <a href="${pageContext.request.contextPath }/submitOrder/${m.taskId}.do">提交采购单
                            </a>
                        </c:when>
                        <c:when test="${m.activityId=='firstAudit' }">
                            <a href="${pageContext.request.contextPath }/showAudit/${m.id}/${m.activityId}/${m.taskId}.do">部门经理审核</a>
                        </c:when>
                        <c:when test="${m.activityId=='secondAudit' }">
                            <a href="${pageContext.request.contextPath }/showAudit/${m.id}/${m.activityId}/${m.taskId}.do">校长审核</a>
                        </c:when>
                        <c:when test="${m.activityId=='thirdAudit' }">
                            <a href="${pageContext.request.contextPath }/showAudit/${m.id}/${m.activityId}/${m.taskId}.do">财务审核</a>
                        </c:when>
                    </c:choose>
                </td>
            </Tr>
        </c:forEach>
    </table>
</div>
</body>
</html>

